package com.fanxuankai.boot.upush.autoconfigure;

import com.fanxuankai.boot.upush.PushClient;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
import org.springframework.web.client.RestTemplate;

/**
 * @author fanxuankai
 */
@EnableConfigurationProperties({PushProperties.class})
@Import({PushClient.class})
public class PushAutoconfiguration {
    @Bean
    @ConditionalOnMissingBean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
